import { jest } from '@jest/globals';
import { formatError, formatSuccess } from '../utils/helpers.js';

describe('Basic functionality tests', () => {
  test('formatError should return correct structure', () => {
    const error = formatError('TEST_ERROR', 'Test message');
    
    expect(error.success).toBe(false);
    expect(error.error.code).toBe('TEST_ERROR');
    expect(error.error.message).toBe('Test message');
    expect(error.timestamp).toBeDefined();
  });

  test('formatSuccess should return correct structure', () => {
    const success = formatSuccess({ test: 'data' }, 'Success message');
    
    expect(success.success).toBe(true);
    expect(success.data.test).toBe('data');
    expect(success.message).toBe('Success message');
    expect(success.timestamp).toBeDefined();
  });
});